Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): restore empty error blocks on cancelled runs #15215

Merged
merged 3 commits into from
May 17, 2024

Conversation

sfoster1
Copy link
Member

@sfoster1 sfoster1 commented May 17, 2024

I think this would be a subtle side effect of a previous pr trying to improve PE end behavior.

The reason this fix is required is that when a client cancels a protocol by stopping the engine, the StopAction sets the run result (good) and doesn't set a run error (good, correct, there wasn't one, this is a cancel). In 7.2, with the behavior this PR now restores, a FinishAction that might contain an error wouldn't set that error in the run if it already had a result, whether or not it had an error. In 7.3, it would set the error if the engine had no error, which it wouldn't, because there is no error when you stop.

Testing

  • With this PR, cancelling a run on a real robot causes the ODD to show an inactive error details button
  • With this PR, stopping a run by hitting an estop still causes the ODD and desktop to display that an estop error cancelled the run

Closes RQA-2737

@sfoster1 sfoster1 marked this pull request as ready for review May 17, 2024 21:21
@sfoster1 sfoster1 requested a review from a team as a code owner May 17, 2024 21:21
Copy link
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoof, nice find, sorry about that.

The tests show this failing some E-stop-related test that I added in #14929. I'm trying to remind myself of its implications.

There's certainly a way to solve both problems at once, but I'm a little reluctant to do more PE state work this late in v7.3. What do you think?

@vegano1
Copy link
Contributor

vegano1 commented May 17, 2024

Wow subtle indeed, this fixed the issue.
Tested this on appui bot and cannot repro anymore.
Thank you!

@sfoster1
Copy link
Member Author

Whoof, nice find, sorry about that.

The tests show this failing some E-stop-related test that I added in #14929. I'm trying to remind myself of its implications.

There's certainly a way to solve both problems at once, but I'm a little reluctant to do more PE state work this late in v7.3. What do you think?

The implication would be that, conversely, an estop error would not get reported.

4c30bf5 i'm pretty sure restores the exact thing your PR was meant to remove but such is life on a timeline, and I think it will work.

Copy link
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, sounds like a plan, presuming it passes the on-robot tests. (Thank you @vegano1 for testing!)

@vegano1
Copy link
Contributor

vegano1 commented May 17, 2024

The change is working as expected, see attached images.

  • The error modal is no longer shown when the run is manually canceled
  • The error modal shows the appropriate error when the e-stop is pressed
Screen Shot 2024-05-17 at 5 43 03 PM Screen Shot 2024-05-17 at 5 38 07 PM Screen Shot 2024-05-17 at 5 40 19 PM

Copy link
Contributor

@vegano1 vegano1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on app ui bot, working as expected.

@sfoster1
Copy link
Member Author

Tested on app ui bot, working as expected.

Thank you!

@sfoster1 sfoster1 merged commit d83c4e6 into chore_release-7.3.0 May 17, 2024
19 of 20 checks passed
@sfoster1 sfoster1 deleted the rqa-2737-surprise-errors branch May 17, 2024 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants